package com.atguigu.gmall.order;

import com.atguigu.gmall.common.config.interceptor.annotation.EnableRequestHeaderInterceptor;
import com.atguigu.gmall.common.config.interceptor.component.UserAuthComponent;
import com.atguigu.gmall.common.execption.GlobalExceptionHandler;
import com.atguigu.gmall.rabbit.annotation.EnableAppRabbitAutoConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Author:lyd
 **/
@MapperScan("com.atguigu.gmall.order.mapper")
@SpringCloudApplication
@EnableFeignClients(basePackages = {"com.atguigu.gmall.feign.user",
        "com.atguigu.gmall.feign.cart",
        "com.atguigu.gmall.feign.product",
        "com.atguigu.gmall.feign.ware"

})
@EnableRequestHeaderInterceptor
@Import({UserAuthComponent.class, GlobalExceptionHandler.class})
@EnableTransactionManagement
@EnableAppRabbitAutoConfiguration
public class ServicesOrderApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServicesOrderApplication.class, args);
    }
}
